package main

fun main() {
    for (i in 1..20) {
        useWhen(i)
    }
    val key = "第一册 第一课 《识字1》"
    val map = HashMap<String, String>()
    val mutableMap= mutableMapOf<String,String>()
    val map1= mapOf<String,String>("One" to "One","Two" to "Two")
    map[key] = "测试使用的"
    map[key] = "测试使用的"
    map[key] = "测试使用的"
    for (item in map.values) {
        println(item)
    }
}

fun useWhen(level: Int) {
    when (level) {
        in 1..5 -> println("$level 等级D")
        in 6..10 -> println("$level 等级C")
        in 11..15 -> println("$level 等级B")
        else -> println("$level 等级A")
    }
}